<%@ page isELIgnored="false" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

    <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
    <link rel='stylesheet' href='/css/hrsym.css'>
    <base href="<%=request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + request.getContextPath() + "/"%>"/>
    <title></title>
    <script type="text/javascript">
        window.onload=function(){             //填充
            let c = document.getElementById("mycanvas");//获取canvas对象

            //获取canvas对象
            let context = c.getContext("2d");//构建2d环境
            context.beginPath();
            context.moveTo(200,30);
            context.lineTo(160,140);
            context.lineTo(257,70);
            context.lineTo(140,70);
            context.lineTo(231,140);
            context.closePath();//结束/闭合
            context.fillStyle="red";//填充的背景色
            context.fill()
            c = document.getElementById("mycanvas1");
            context = c.getContext("2d");//构建2d环境
            context.beginPath();
            context.moveTo(200,30);
            context.lineTo(160,140);
            context.lineTo(257,70);
            context.lineTo(140,70);
            context.lineTo(231,140);
            context.closePath();//结束/闭合
            context.fillStyle="#FFD700";//填充的背景色
            context.fill()//填充
        }


    </script>

    <%
    HttpSession Session=request.getSession();
//        String st= (String) session1.getAttribute("a1sd");
      Session.getAttribute("lif0");
        Session.getAttribute("sj");
        Session.getAttribute("dbt1");


        request.getAttribute("lsbw");
     String antybj= (String) Session.getAttribute("antybj");
     request.getAttribute("bennian");
       request.getAttribute("bain1");
        Session.getAttribute("bjui");
        session.getAttribute("nian");
        session.getAttribute("yue");
        request.getAttribute("bjcx");
        request.getAttribute("HRSKaoQinQinKuaN");
        Session.getAttribute("bain2rt");
//    Object sde=  Session.getAttribute("dbt");
//   int ste1= (int) sde;
       // request.getAttribute("lsbjcx12");

    %>
</head>
<body>
<div id="dinbu" style="width: 100%; height: 100%; background-color: beige;">
    <div id="dinbua1">
        <canvas id="mycanvas1" style="width:90px;height:50px; "></canvas>
        <div style="color:azure ;float: left; margin:5px 0px 0px 0px; font-family: '宋体';font-size: 20px;">收藏赛事星</div>
        <div style="color:azure;float: left; margin:5px 0px 0px 40%;  font-size: 20px; font-family: '楷体'">${lif0.ugender}  | </div>
        <div style="color:azure;float: left; margin:5px 0px 0px 0px;  font-size: 20px; font-family: '楷体'"> 帮助中心</div>
        <div > 帮助中心</div>
    </div>
    <div id="dinbua2">
        <canvas id="mycanvas" style="width:150px;height:70px;"></canvas>
        <div id="ssxzt">赛事星</div>
        <div id="xiantiao"> </div>
        <div id="zi">CNKI旗下 <b id="b1"> 竞赛 . 考试  . 竞答 </b> 平台</div>
        <div id="xiantiao1"> </div>
        <div id="xiantiao2"> </div>
        <div id="grzx">考勤情况</div>
    </div>
    <div id="xiantiao3"> </div>
<%--    background:url('img/dind.png') no-repeat--%>
    <div id="xiantiao4" style="">
        <img style="width:1560px "  src="img/dind.png"/>
        <div id="div1">
            <div id="d1" class="dd"><img src="img/pkq.jpg" /></div>
<%--            <div id="d2"class="dd"><img src="img/pkq.jpg"/></div>--%>
<%--            <div id="d3"class="dd"><img src="img/pkq.jpg"/></div>--%>
<%--            <div id="d4"class="dd"><img src="img/pkq.jpg"/></div>--%>
<%--            <div id="d5"class="dd"><img src="img/pkq.jpg"/></div>--%>
<%--            <div id="d6"class="dd"><img src="img/pkq.jpg"/></div>--%>
        </div>
    </div>




   <div id="xiantia5" style="margin: -200px 0px 0px 435px ;float:left;color: aliceblue ">${lif0.uname} </div>

</div>
<div style="width: 260px ;height: 600px ;background-color: #b0aeae;  margin :30px 0px 0px 0px;float :left;">
<div  style="text-align:center;font-size:25px;color: #ff9a00; width: 100%;height:34px;background-color:#656565;font-family: '楷体'">老师带班级</div>

<form action="<%=request.getContextPath()%>/yuezuoyei/fan2" method='post'>

<button type="submit" name="admin1"  to="drys.jsp"  value="${lif0.uid}">查看本人所有班级</button>
<%--<button   to="drys1.jsp">查看月情况</button>--%>
<%--<button  to="drys2.jsp">添加考勤</button>--%>
<%--<button   to="drys3.jsp"></button>--%>
</form >

<c:if test="${lif0.uprofession!='老师'}">
<div style="width: 100px ;height: 100px;margin: 10% auto;text-align:center;background-color: #aeadad"><div style="width: 100%;height: 30px;color: #ef2e2d">警告</div><div>你不是老师</div>
    <form action="<%=request.getContextPath()%>/dr.jsp" method='post' >
    <input type="submit" value="退出" >
    </form>
</div>
</c:if>
<c:if test="${lif0.uprofession=='老师'}">
<div class="" style="">
    <div class="demo demo-1" style= "background-color: #b0aeae;  padding: 15px 32px;width:75%;height: 110px; overflow-x: scroll; -webkit-overflow-scrolling:touch;display: -webkit-box;white-space: nowrap; overflow-x: hidden; overflow-y: auto;">

    <form action="<%=request.getContextPath()%>/yuezuoyei/fan3" method='post'>

    <c:forEach items="${lsbjcx12}" var="u1" varStatus="i">

        <button name="antybj"  value="${u1.cname}">${u1.cname}</button><br>

    </c:forEach>
    </form >
    </div>
</div>

    <div style="text-align:center;font-size:25px;color: #ff9a00; width: 100%;height:34px;background-color: #656565;font-family: '楷体';margin: 10px auto;">创建班级年份到本年</div>
    <div class="demo demo-1" style= "  padding: 15px 32px;width:75%;height: 110px; overflow-x: scroll; -webkit-overflow-scrolling:touch;display: -webkit-box;white-space: nowrap; overflow-x: hidden; overflow-y: auto;background-color: #b0aeae">
    <form action="<%=request.getContextPath()%>/yuezuoyei/fan3" method='post'>
        <input style="display:none" name="antyt1rt1"  value="<%=antybj%>">
       <input style="display:none"  name="bennian"   value="${sj.dqsj}">
    <c:forEach var="pagenum" begin="${sj.kssj}" end="${sj.dqsj}" varStatus="states">
        <button type="submit" name="bain1"   value="${states.index}">${states.index}</button><br>
    </c:forEach>
    </form >
    </div>
    <div style="text-align:center;font-size:25px;color: #ff9a00; margin: 10px auto;  width: 100%;height:34px;background-color:#656565;font-family: '楷体'">选择月份<b style="font-size:15px ">（没有超过本月数字）</b></div>
    <div class="demo demo-1"  style= "  padding: 15px 32px;width:75%;height: 110px; overflow-x: scroll; -webkit-overflow-scrolling:touch;display: -webkit-box;white-space: nowrap;overflow-x: hidden; overflow-y: auto; background-color: #b0aeae">
    <form action="<%=request.getContextPath()%>/yuezuoyei/fan4" method='post'>
        <input  style="display:none" name="bj1"  value="${bjui}">
        <input style="display:none" name="nian1"   value="${bain1}">
<c:if test="${bennian==bain1&&bain1!=0}">

    <c:forEach var="pagenum" begin="${1}" end="${lsbw.yue}" varStatus="states1">
        <button type="submit" name="yue1" value="${states1.index}">&nbsp;${states1.index}&nbsp;&nbsp;</button><br>
    </c:forEach>
</c:if>
    <c:if test="${bennian!=bain1&&bain1!=0}">
        <c:forEach var="pagenum" begin="${1}" end="${12}" varStatus="states1">
            <button type="submit" name="yue1" value="${states1.index}">&nbsp;${states1.index}&nbsp;&nbsp;</button><br>
        </c:forEach>
    </c:if>

    </form>
</div>
</div>

<div style="color: #333333;margin: 0px 0px 0px 100px;float: left"><d style="color: #ef2e2d">考勤情况</d>红色有没写作业或者旷课的请<d style="color: #ef2e2d">点击红色看详情</d></div>
<form >
<button style="margin: -30px 0px 0px 570px;float: left">考勤添加</button>
</form>
<table border="1" style=" width:75%;height: 30%; margin: -38.5% 0px 0px 21%; float: left;">
    <tr>
<%--        <div class='t'>日</div>--%>
<%--        <div>一</div>--%>
<%--        <div>二</div>--%>
<%--        <div>三</div>--%>
<%--        <div>四</div>--%>
<%--        <div>五</div>--%>
<%--        <div>六</div>--%>

        <td>学生id</td>
        <td>姓名</td>
        <td>
            <table border="1" >
                <tr class="erili">
                    <td style="width: 30px">日期</td>
                    <c:if test="${bain2rt%4==0&&bain2rt%100!=0||bain2rt%400==0}">
                            <c:if test="${yue==2}">
                        <c:forEach var="u1" begin="1" end="29" varStatus="i">
                            <td colspan="2" style=" width: 130px ;height: 30px;font-size: 12px;" >${u1} &nbsp;</td>
                    </c:forEach>
                    </c:if>
                    <c:if test="${yue==1||yue==3||yue==5||yue==7||yue==8||yue==10||yue==12}">
                        <c:forEach var="u" begin="1" end="31" varStatus="i">
                            <td colspan="2" style="width: 130px ;height: 30px;font-size: 12px" >${u} &nbsp; </td>
                        </c:forEach>
                    </c:if>
                    <c:if test="${yue==4||yue==6||yue==9||yue==11}">
                        <c:forEach var="u" begin="1" end="30" varStatus="i">
                            <td colspan="2" style="width: 130px ;height: 30px;font-size:12px" >${u} &nbsp;</td>
                        </c:forEach>
                    </c:if>
                    </c:if>
<c:if test="${bain2rt%4!=0&&bain2rt%100!=0&&bain2rt%400!=0}">
                    <c:if test="${yue==1||yue==3||yue==5||yue==7||yue==8||yue==10||yue==12}">
                    <c:forEach var="u" begin="1" end="31" varStatus="i">
                        <td colspan="2" style="width: 130px ;height: 30px;font-size: 12px" >${u} &nbsp;</td>
                    </c:forEach>
                </c:if>
                    <c:if test="${yue==2||yue==4||yue==6||yue==9||yue==11}">
                    <c:forEach var="u" begin="1" end="30" varStatus="i">
                        <td colspan="2" style="width: 130px ;height: 30px;font-size:12px" >${u} &nbsp;</td>
                    </c:forEach>
                </c:if>
</c:if><button style="width: 50px ;height: 50px; margin:8px 0px 0px 0px;float: right;text-align: center;font-size: 10px">操作</button>
                </tr>
            </table>
        </td>
<c:forEach items="${bjcx}" var="u1" varStatus="i">
    <tr class="erili">
    <td>${u1.user_uid}</td>
    <td>${u1.user_uname}</td>
    <td>
        <table border="1" width="100%">
            <tr class="erili1">
                <td style="width: 100px">状态</td><c:if test="${nian%4==0&&nian%100!=0||nian%400==0}">
        <c:if test="${yue==2}">
    <c:forEach var="ustr" begin="1" end="29" varStatus="i">
        <td class="stu" style="width: 130px ;height: 30px"><c:forEach items="${HRSKaoQinQinKuaN}" var="ua" varStatus="i">
            <c:if test="${ua.user_uid ==u1.user_uid&&ua.DAY_task_roleid==ustr}">
                <div style="display:none">姓名${u1.user_uname}</div>
                <div style="display:none">${nian}年</div>
                <div style="display:none">${yue}月</div>
                <div style="display:none">${ua.DAY_task_roleid}日</div>
                <div style="width:90%;height: 90%; background-color: #ef2e2d"><b style=" display:none">${ua.task_cause}</b></div>
            </c:if>
        </c:forEach> </td>

    </c:forEach>
            <form action="<%=request.getContextPath()%>/yuezuoyei/fan5" method='post'>
                <input style="display:none" name="bjst" value="${bjui}">
                <input style="display:none" name="ner" value="${u1.user_uname}">
                <button name="antr" value="${u1.user_uid}" style="width: 50px ;  height: 50px; margin:8px 0px 0px 0px;float: right;text-align: center;font-size: 10px">添加</button>
            </form>
                </c:if>
                <c:if test="${yue==1||yue==3||yue==5||yue==7||yue==8||ps2==10||yue==12}">
                    <c:forEach var="ustr" begin="1" end="31" varStatus="i">
                        <td class="stu" style="width: 130px ;height: 30px"><c:forEach items="${HRSKaoQinQinKuaN}" var="ua" varStatus="i">
                            <c:if test="${ua.user_uid ==u1.user_uid&&ua.DAY_task_roleid==ustr}">
                                <div style="display:none">姓名${u1.user_uname}</div>
                                <div style="display:none">${nian}年</div>
                                <div style="display:none">${yue}月</div>
                                <div style="display:none">${ua.DAY_task_roleid}日</div>
                                <div style="width:90%;height: 90%; background-color: #ef2e2d"><b style=" display:none">${ua.task_cause}</b></div>
                            </c:if>
                        </c:forEach> </td>
                    </c:forEach>
                    <form action="<%=request.getContextPath()%>/yuezuoyei/fan5" method='post'>
                        <input style="display:none" name="bjst" value="${bjui}">
                        <input style="display:none" name="ner" value="${u1.user_uname}">
                        <button name="antr" value="${u1.user_uid}" style="width: 50px ;  height: 50px; margin:8px 0px 0px 0px;float: right;text-align: center;font-size: 10px">添加</button>
                    </form>
                </c:if>
                <c:if test="${yue==4||yue==6||yue==9||yue==11}">
                    <c:forEach var="ustr" begin="1" end="30" varStatus="i">

                        <td class="stu" style="width: 130px ;height: 30px"><c:forEach items="${HRSKaoQinQinKuaN}" var="ua" varStatus="i">
                            <c:if test="${ua.user_uid ==u1.user_uid&&ua.DAY_task_roleid==ustr}">
                                <div style="display:none">姓名${u1.user_uname}</div>
                                <div style="display:none">${nian}年</div>
                                <div style="display:none">${yue}月</div>
                                <div style="display:none">${ua.DAY_task_roleid}日</div>
                                <div style="width:90%;height: 90%; background-color: #ef2e2d"><b style=" display:none">${ua.task_cause}</b></div>
                            </c:if>
                        </c:forEach> </td>
                    </c:forEach>
                    <form action="<%=request.getContextPath()%>/yuezuoyei/fan5" method='post'>
                        <input style="display:none" name="bjst" value="${bjui}">
                        <input style="display:none" name="ner" value="${u1.user_uname}">
                        <button name="antr" value="${u1.user_uid}" style="width: 50px ;  height: 50px; margin:8px 0px 0px 0px;float: right;text-align: center;font-size: 10px">添加</button>
                    </form>
                </c:if>
    </c:if>
                <c:if test="${bain2rt%4!=0&&bain2rt%100!=0&&bain2rt%400!=0}">
                <c:if test="${yue==1||yue==3||yue==5||yue==7||yue==8||yue==10||yue==12}">
                    <c:forEach var="ustr" begin="1" end="31" varStatus="i">
                        <td class="stu" style="width: 130px ;height: 30px" ><c:forEach items="${HRSKaoQinQinKuaN}" var="ua" varStatus="i">
                                <c:if test="${ua.user_uid ==u1.user_uid&&ua.DAY_task_roleid==ustr}">
                                    <div style="display:none">姓名${u1.user_uname}</div>
                                    <div style="display:none">${nian}年</div>
                                    <div style="display:none">${yue}月</div>
                                    <div style="display:none">${ua.DAY_task_roleid}日</div>
                                    <div style="width:90%;height: 90%; background-color: #ef2e2d"><b style=" display:none">${ua.task_cause}</b></div>
                                </c:if>
                            </c:forEach>
                        </td>
                        </c:forEach>
                    <form action="<%=request.getContextPath()%>/yuezuoyei/fan5" method='post'>
                        <input style="display:none" name="bjst" value="${bjui}">
                        <input style="display:none" name="ner" value="${u1.user_uname}">
                        <button name="antr" value="${u1.user_uid}" style="width: 50px ;  height: 50px; margin:8px 0px 0px 0px;float: right;text-align: center;font-size: 10px">添加</button>
                    </form>
                </c:if>
                <c:if test="${yue==2||yue==4||yue==6||yue==9||yue==11}">

                    <c:forEach var="ustr" begin="1" end="30" varStatus="i">

                        <td class="stu" style="width: 130px ;height: 30px">
                            <c:forEach items="${HRSKaoQinQinKuaN}" var="ua" varStatus="i">
                            <c:if test="${ua.user_uid ==u1.user_uid&&ua.DAY_task_roleid==ustr}">
                                <div style="display:none">姓名:${u1.user_uname}</div>
                                <div style="display:none">${nian}年</div>
                                <div style="display:none">${yue}月</div>
                                <div style="display:none">${ua.DAY_task_roleid}日</div>
                                <div style="width:90%;height: 90%; background-color: #ef2e2d"><b style=" display:none">${ua.task_cause}</b></div>
                            </c:if>
                        </c:forEach>
                        </td>

                    </c:forEach>
                    <form action="<%=request.getContextPath()%>/yuezuoyei/fan5" method='post'>
                        <input style="display:none" name="bjst" value="${bjui}">
                        <input style="display:none" name="ner" value="${u1.user_uname}">
                        <button name="antr" value="${u1.user_uid}" style="width: 50px ;  height: 50px; margin:8px 0px 0px 0px;float: right;text-align: center;font-size: 10px">添加</button>
                    </form>
                </c:if>
                </c:if>
    </td>
            </tr>
        </table>
    </td>
</tr>
        </c:forEach>
<tr>
    <td colspan="3" style="width: 100px">
        <div   style= "border-color:#b2263c;width:100%;height: 90px; overflow-x: scroll; -webkit-overflow-scrolling:touch;display: -webkit-box;white-space: nowrap; ">

            <c:forEach var="chis" begin="1" end="${cishs}" varStatus="i">
        <form action="<%=request.getContextPath()%>/yuezuoyei/fan4" method='post'>

            <button  style="margin: 0px 0px 0px 0px"  name="chis" value="${chis}">${chis}</button>
            <input style="display:none" name="yue1" value="${yue}">
            <input  style="display:none" name="bj1"  value="${bjui}">
            <input  style="display:none" name="nian1"   value="${nian}">
            </c:forEach>

        </div>
    </td>

</tr>

</table>
</c:if>
<div id="div1r" style="margin: -70px 0px 0px 0px">
    <div style="width: 100%;height: 30px;background-color: #21D4FD; " >情况</div>
    <div id="div1r1"></div>
</div>
<div id="div2" style="margin: -70px 0px 0px 0px">
    <div style="width: 100%;height: 30px;background-color: #ff9a00;" >情况</div>
    <div id="div21"></div>
</div>
</body>
<script type="text/javascript" src="<%=request.getContextPath()%>/js/jquery.min.js" ></script>
<script>

    var path="<%=request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + request.getContextPath() + "/"%>";

    $(function(){

         $("td.stu").click(function(){
             $("#div1r1").html($(this).text());
             $("#div21").html($(this).text());
        //     // var ule=$(this).attr("value");
        //
        //     alert($(this).text());

             $('#div1r').show();
         },function(){

        })
        $('td.stu').click(function(){
            $("#div1r1").html($(this).text());
            $("#div21").html($(this).text());
            if ( event && event.stopPropagation ) {
                // this code is for Mozilla and Opera
                event.stopPropagation();
            }
            else if (window.event) {
                // this code is for IE
                window.event.cancelBubble = true;
            }
            $('#div2').show();
        });
        $(document).click(function(){
            $('#div2').hide();
        });
    })

</script>
</html>
